package org.graduation.feignapi;

import org.graduation.model.common.ResponseResult;
import org.graduation.model.common.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("user-service")
public interface UserClient {
    @RequestMapping(value = "/user/info/email", method = RequestMethod.GET)
    ResponseResult<User> info(@RequestParam(value = "email") String email);

    @GetMapping("/user/info/u_id/{u_id}")
    ResponseResult getInfoById(@PathVariable(value = "u_id") int u_id);

    @PostMapping("/user/search/list/uid")
    ResponseResult<List<User>> search(@RequestBody List<Integer> uidList);
}
